<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ko">
<head>
	<title>콘텐츠관리</title>
	<script type="text/javascript">
	// 페이지 이동
	function setPage(page)
	{
		var frm = document.forms["listMap"];
		frm.action = "/admin/contentmng_list.do";
		frm.page.value = page;
		frm.submit();
	}

	// 수정 이동
	function edit(sid)
	{
		if(!checkAuth()) return;
		var frm = document.forms["listMap"];
		frm.action = "/admin/contentmng_edit.do";
		frm.content_sid.value = sid;
		frm.submit();
	}
	</script>
</head>

<body>
		<form id="listMap" name="listMap" method="get">
		<input type="hidden" name="page" value="${commandMap.page}" />
		<input type="hidden" name="conditions" value="${commandMap.conditions}" />
		<input type="hidden" name="words" value="${commandMap.words}" />
		<input type="hidden" name="content_sid" value="" />
		</form>
		<!-- 본문 영역 -->
		<div id="contents">
			<!-- 제목 및 Location 영역 -->
			<div id="location">
				<h3>콘텐츠관리</h3>
				<div>홈 &gt; 관리메뉴 &gt; <strong>콘텐츠관리</strong></div>
			</div>

			<!-- 본문 내용 -->
			<div id="content">
				<div class="boxType01">
					<form name="searchFrm" emthod="get" action="contentmng_list.do">
					<div class="cont ar">
						<select title="검색 조건 선택" name="conditions">
							<option value="content_title">제목</option>
							<option value="content_body">내용</option>
						</select>
						<input type="text" name="words" size="25" />
						<span class="button btnProc04"><input type="submit" value="검색"/></span>
					</div>
					</form>
				</div>
				<div class="ar mt15"><span class="button btnProc01"><a href="#" onclick="checkAuth('../admin/contentmng_write.do');">등록</a></span></div>
				<table cellpadding="0" cellspacing="0" border="0" class="tbl_type01 mt20">
					<colgroup>
						<col width="120px" />
						<col />
					</colgroup>
					<thead>
						<tr>
							<th>SID</th>
							<th>제목</th>
						</tr>
					</thead>
					<tbody>
					<c:forEach items="${listMap}" var="listMap" varStatus="status">
						<tr>
							<td><a onclick="edit('${listMap.CONTENT_SID}'); return false;" href="#">${listMap.CONTENT_SID}</a></td>
							<td><a onclick="edit('${listMap.CONTENT_SID}'); return false;" href="#">${listMap.CONTENT_TITLE}</a></td>
						</tr>
					</c:forEach>
					</tbody>
				</table>
				<%@include file="/include/pageList.jsp"%>
			</div>
		</div>
</body>
</html>